package com.mixed.test.dbutil;

import javax.naming.Context;
import javax.naming.InitialContext;
import javax.sql.DataSource;

import org.apache.commons.dbutils.QueryRunner;

public class DbutilBase {
	
	protected DataSource ds;

	protected void initJndi() throws Exception{
		Context context = new InitialContext();
		ds = (DataSource) context.lookup("java:comp/env/jdbc/mixedDS");
	}
	
	protected QueryRunner createQueryRunner(){
		QueryRunner qr = new QueryRunner(ds);
		return qr;
	}
}
